﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Dqs_BLL;
using Model;
using Sunny.UI;
namespace Dqs_UI
{
	public partial class frmAddTeacher : UIForm
	{
		public frmAddTeacher()
		{
			InitializeComponent();
		}
		Teacher_BLL Teacher_BLL = new Teacher_BLL();

		private void uiButton1_Click(object sender, EventArgs e)
		{
			TeacherInfo teacherInfo = new TeacherInfo()
			{
				TeaNum = txtStuNum.Text.Trim(),
				UserName = txtUserName.Text.Trim(),
				Password = txtPwd.Text.Trim(),
				FullName = txtFullName.Text.Trim(),
				Phone = txtPhone.Text.Trim()
			};


			if (Teacher_BLL.InsertTeacherInfo(teacherInfo))
			{
				DialogResult = DialogResult.OK;
			}
			else
			{
				MessageBox.Show("请检查输入内容是否正确！");
			}
		}

		private void uiButton2_Click(object sender, EventArgs e)
		{
			txtStuNum.Clear();
			txtUserName.Clear();
			txtPwd.Clear();
			txtFullName.Clear();
			txtPhone.Clear();
		}
	}
}
